<script setup>
// 可以在这里添加一些响应式数据或方法
</script>

<template>
  <div class="home">
    <div class="hero-section">
      <div class="hero-content">
        <h1 class="hero-title">
          <span class="gradient-text">AI智能体</span>
        </h1>
        <p class="hero-subtitle">
          专业AI智能助手平台
        </p>
        <p class="hero-description">
          专业AI智能体，提供智能对话、代码分析、数据处理等全方位AI服务
        </p>
        
        <div class="hero-actions">
          <router-link to="/chat" class="btn btn-primary">
            🚀 开始体验
          </router-link>
        </div>
      </div>
      
      <div class="hero-image">
        <div class="chat-preview">
          <div class="chat-window">
            <div class="chat-header">
              <div class="chat-dots">
                <span></span>
                <span></span>
                <span></span>
              </div>
              <span class="chat-title">AI助手</span>
            </div>
            <div class="chat-messages">
              <div class="message ai">
                <div class="avatar">🤖</div>
                <div class="text">您好！我是您的AI助手，有什么可以帮助您的吗？</div>
              </div>
              <div class="message user">
                <div class="text">请介绍一下机器学习</div>
                <div class="avatar">👤</div>
              </div>
              <div class="message ai">
                <div class="avatar">🤖</div>
                <div class="text">机器学习是人工智能的核心分支...</div>
              </div>
            </div>
            <div class="typing-indicator">
              <span></span>
              <span></span>
              <span></span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<style scoped>
.home {
  min-height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #0a1a2a 0%, #1e3c5a 100%);
  color: white;
}

/* Hero Section */
.hero-section {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  gap: 4rem;
}

.hero-content {
  flex: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, #00d4aa, #4dabf7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #00d4aa, #00c199);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 170, 0.3);
}



/* Hero Image */
.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.chat-preview {
  perspective: 1000px;
}

.chat-window {
  width: 320px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: rotateY(-15deg) rotateX(5deg);
  transition: transform 0.3s ease;
}

.chat-window:hover {
  transform: rotateY(-10deg) rotateX(2deg) scale(1.02);
}

.chat-header {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: rgba(0, 212, 170, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-dots {
  display: flex;
  gap: 4px;
  margin-right: auto;
}

.chat-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.chat-title {
  font-weight: 600;
  font-size: 14px;
}

.chat-messages {
  padding: 1rem;
  height: 200px;
  overflow: hidden;
}

.message {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.message:nth-child(1) { animation-delay: 0.2s; }
.message:nth-child(2) { animation-delay: 0.8s; }
.message:nth-child(3) { animation-delay: 1.4s; }

.message.user {
  flex-direction: row-reverse;
}

.message .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.message.user .avatar {
  background: rgba(0, 212, 170, 0.3);
}

.message .text {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
  max-width: 200px;
}

.message.user .text {
  background: rgba(0, 212, 170, 0.3);
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: fit-content;
  margin-left: 36px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }



/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typing {
  0%, 60%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  30% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 1rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}
</style>
